package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.service.PersonnelDetailsService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 企业个人信息管理(疫情期间)
 */
@RestController
@RequestMapping("/personnelDetails")
public class PersonnelDetailsController {

    @Reference
    public PersonnelDetailsService personnelDetailsService;

    /**
     *
     * @param queryPageBean
     * @return
     */
    @RequestMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean){
        PageResult pageResult = personnelDetailsService.findPage(queryPageBean.getCurrentPage()
                , queryPageBean.getPageSize()
                , queryPageBean.getQueryString());
        return pageResult;
    }
}
